﻿/*
控件
*/

function ControlDisplayWrapper(param) {
    var paramDefault = {
        divId: "pipelineDisplay",
        backgroundImage: "images/pipeline1.png"
    }
    var divId = param.divId;
    this._root = $("#" + divId);
    this._root.addClass("display-wrapper");

    this._root.css({ "background-image": "url(" + param.backgroundImage + ")" });
}
ControlDisplayWrapper.prototype.defaultGraphicParameter = {
    className: "display-graphic",
    title: "",
    content:"",
    left: 10,
    top:10
}
ControlDisplayWrapper.prototype.add=function(param) {
    param = param || ControlDisplayWrapper.defaultGraphicParameter;
    var htmlGraphic = '<div class="display-graphic">\
            <div class="display-graphic-content">' + param.title + '</div>\
            <div class="display-graphic-content">'+param.content+'</div>\
        </div>';
    var jqGraphic = $(htmlGraphic);
    jqGraphic.css({ "top":  param.top + 'px', "left":  param.left + 'px' });
    this._root.append(jqGraphic);
}


